<template>
    <div>
        <!-- 职级修改{{data}} -->
        <el-form :model="formDate" ref="form" label-width="80px" :inline="false" width="500px">
            <el-row :gutter="24">
                <el-col :span="12">
                    <el-form-item label="职级编码">
                        <el-input v-model="formDate.rankNo" placeholder="请输入职级编码"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="职级层次">
                        <el-input v-model="formDate.rankArrangement" placeholder="请输入职级层次"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row :gutter="24">
                <el-col :span="12">
                    <el-form-item label="职级层次名称">
                        <el-input v-model="formDate.rankArrangementName" placeholder="请输入职级层次名称"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="备注">
                        <el-input v-model="formDate.remark" placeholder="请输入备注"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row :gutter="24">
                <el-col :span="12">
                    <el-form-item label="薪资范围下限">
                        <el-input v-model="formDate.salaryMinimum" placeholder="请输入薪资范围下限"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="薪资范围上限">
                        <el-input v-model="formDate.salaryCap" placeholder="请输入薪资范围上限"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">确定</el-button>
                <el-button>取消</el-button>
            </el-form-item>
        </el-form>

    </div>
</template>

<script setup>
import { defineEmits, defineProps } from 'vue';
import request from "@/api/request";
let emits = defineEmits(['close'])
let props = defineProps(['data'])

let formDate = props.data

let onSubmit = () => {
    request({
        url: 'hris/pm/update',
        method: 'put',
        data: {
            rankNo: props.data.rankNo,
            rankArrangement: props.data.rankArrangement,
            rankArrangementName: props.data.rankArrangementName,
            salaryCap: props.data.salaryCap,
            salaryMinimum: props.data.salaryMinimum,
            remark: props.data.remark
        }
    }).then(resp => {
        emits('close')
    })
}
</script>

<style lang='scss' scoped></style>
